package com.example.lianguisystem.mapperLianGui;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.lianguisystem.VO.DailyCapacityVO;
import com.example.lianguisystem.entity.DailyCapacity;
import com.example.lianguisystem.entity.SalesOrder;
import com.example.lianguisystem.query.DailyCapacityQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Mapper
public interface DailyCapacityMapper extends BaseMapper<DailyCapacity> {
    List<DailyCapacityVO> listDailyCapacity(@Param("query") DailyCapacityQuery query);

    Integer listDailyCapacityOfCount(@Param("query") DailyCapacityQuery query);

    Map<String, Object> selectMnfManuorderByBillid(@Param("billid") Integer billid);

    List<Map<String, Object>> selectMnfManuorderDetailByBillid(@Param("billid") Integer billid);

    Map<String, Object> selectGoodsByCode(@Param("code") String code);
    Map<String, Object> selectGoodsByGoodsid(@Param("goodsid") Integer goodsid);

    List<SalesOrder> selectSalesOrderByIdSet(@Param("set") Set<String> set);

    List<Map<String, Object>> selectJiaGongDanBom(@Param("goodsid") Integer goodsid);

    List<Map<String, Object>> selectWorkshopMapDepartment();

    Integer updateSalesOrderStatisticsStatusById(@Param("list") List<String> list);
    Integer updateLabelRecordBillById(@Param("list") List<String> list, @Param("dailyCapacityId") String dailyCapacityId);
    Integer updateLabelRecordStatusById(@Param("list") List<String> list);

    Integer selectLabelStatusByIdList(@Param("list") List<String> list);

    Integer selectEmpIdByName(@Param("name") String name);

    Map<String, Object> selectPriceByProd(@Param("unitid") Integer unitid, @Param("goodsid") Integer goodsid);

    /**
     * 获取账面库存明细表期末结存
     * @param goodsid
     * @return
     */
    Double selectGoodsPriceByGoodsid(@Param("goodsid") String goodsid,@Param("date") String date,@Param("startDate") String startDate);


    Map<String, Object> selectGoodsByShortName(@Param("sortname") String sortname,@Param("hasDsList") List<Integer> hasDsList);
    List<Map<String, Object>> selectGoodsByShortNameOfAll(@Param("sortname") String sortname);


    String selectGdtypeName(@Param("goodsid") Integer goodsid);
}
